﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using SDSystem.Models;

namespace SDSystem.Controllers
{

    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            ViewBag.Message = "Welcome to SD system!";
            return View();
        }

        public ActionResult DemoEditor()
        {
            return View();
        }

        [HttpPost]
        [ValidateInput(false)]
        public ActionResult DemoEditor(CKEditor e)
        {
            Session["ckContent"] = e.Content;
            return RedirectToAction("DemoView");
        }

        public ActionResult DemoView()
        {
            ViewBag.Content = Session["ckContent"];
            return View();
        }
    }
}
